import { createApp } from 'vue'
import './styles/normalize.css'
import App from './App.vue'
import router from './router'
import pinia from './store'
import './utils/flexible'

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

import AudioService from './utils/audioService';

const audioService = new AudioService(new URL('@/assets/audio/btnSound.wav',import.meta.url).href);

const app = createApp(App)
document.addEventListener('contextmenu', event => event.preventDefault())
app.use(router)
app.use(pinia)
app.use(ElementPlus)
app.mount('#app')

document.addEventListener('mousedown', () => {
    audioService.play();
});


// document.addEventListener('mousedown', (event) => {
//     if (event.target.matches('[data-play-audio]')) {
//         audioService.play();
//     }
// });
